import Home from "./views/Home.vue";

let routes = [
  {
    path: "/login",
    component: () => import("@/views/Login.vue"),
    name: "",
    hidden: true,
  },
  {
    path: "/404",
    component: () => import("@/views/404.vue"),
    name: "",
    hidden: true,
  },
  {
    path: "/",
    component: Home,
    name: "",
    iconCls: "fa fa-tv",
    leaf: true, //只有一个节点
    children: [
      {
        path: "/index",
        component: () => import("@/views/index/index.vue"),
        name: "工作台",
      },
    ],
    redirect: { path: "/index" },
  },
  {
    path: "/",
    component: Home,
    name: "",
    iconCls: "fa fa-user-circle",
    leaf: true, //只有一个节点
    children: [
      {
        path: "/customerManage",
        component: () => import("@/views/customerManage/index.vue"),
        name: "用户管理",
      },
      {
        path: "/cardPage",
        component: () => import("@/views/cardPage/index.vue"),
        name: "名片详情",
        hidden: true,
      },
    ],
  },
  {
    path: "/",
    component: Home,
    name: "企业管理",
    iconCls: "fa fa-address-card",
    children: [
      {
        path: "/companyManage",
        component: () => import("@/views/companyManage/index.vue"),
        name: "企业管理",
      },
      {
        path: "/companyOemManage",
        component: () => import("@/views/companyOemManage/index.vue"),
        name: "OEM管理",
      },
      {
        path: "/companyCardPage",
        component: () => import("@/views/companyCardPage/index.vue"),
        name: "企业详情",
        hidden: true,
      },
      {
        path: "/companyVideo",
        component: () => import("@/views/companyVideo/index.vue"),
        name: "短视频管理",
      }, //企业功能管理
      {
        path: "/modelSwitch",
        component: () => import("@/views/modelSwitch/index.vue"),
        name: "模块管理",
      },
      {
        path: "/permissionsManage",
        component: () => import("@/views/permissionsManage/index.vue"),
        name: "权限管理",
      },
      {
        path: "/operationRecords",
        component: () => import("@/views/operationRecords/index.vue"),
        name: "操作记录",
      },
    ],
  },
  {
    path: "/",
    component: Home,
    name: "企业服务",
    iconCls: "fa fa-file-text",
    children: [
      {
        path: "/activity",
        component: () => import("@/views/activity/index.vue"),
        name: "活动管理",
      },
      {
        path: "/publishActivity",
        component: () => import("@/views/activity/activity.vue"),
        name: "发布活动",
        hidden: true,
      },
      {
        path: "/editActivity",
        component: () => import("@/views/activity/activity.vue"),
        name: "编辑活动",
        hidden: true,
      },
      {
        path: "/buyActivity",
        component: () => import("@/views/activity/buyactivity.vue"),
        name: "购买详情",
        hidden: true,
      },
      {
        path: "/serviceOrder",
        component: () => import("@/views/serviceOrder/index.vue"),
        name: "订单管理",
      },
      {
        path: "/orderDetail",
        component: () => import("@/views/serviceOrder/detail.vue"),
        name: "订单详情",
      },
    ],
  },
  {
    path: "/data",
    component: Home,
    name: "数据中心",
    iconCls: "fa fa-bar-chart",
    children: [
      {
        path: "/data/yimaiSmartCard",
        component: () => import("@/views/YimaiSmartCard/index.vue"),
        name: "智能名片",
      },
      {
        path: "/data/yimaiCrmCard",
        component: () => import("@/views/YimaiCrmCard/index.vue"),
        name: "智能CRM",
      },
      {
        path: "/data/visitorData",
        component: () => import("@/views/visitorData/index.vue"),
        name: "访客数据",
      },
    ],
  },
  {
    path: "/",
    component: Home,
    name: "小程序管理",
    iconCls: "fa fa-file-text",
    children: [
      {
        path: "/codeManage",
        component: () => import("@/views/codeManage/index.vue"),
        name: "代码管理",
      },
      {
        path: "/versionManage",
        component: () => import("@/views/versionManage/index.vue"),
        name: "小程序版本管理",
      },
      {
        path: "/wxappletManage",
        component: () => import("@/views/wxappletManage/index.vue"),
        name: "小程序管理",
      },
    ],
  },
  {
    path: "/",
    component: Home,
    name: "",
    iconCls: "fa fa-envelope-o",
    leaf: true, //只有一个节点
    children: [
      {
        path: "/companyNotice",
        component: () => import("@/views/companyNotice/index.vue"),
        name: "更新公告",
      },
    ],
    redirect: { path: "/index" },
  },
  {
    path: "*",
    hidden: true,
    redirect: { path: "/404" },
  },
];

export default routes;
